home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
526-550
/
disk_548
/
tg
/
tg eyes.doc
< prev
next >
Wrap
Text File
|
1992-05-06
|
8KB
|
200 lines
*****************************************************************************
* *
* TG Eyes *
* ( copyright by Thomas Geib in July 1991 ) *
* *
*****************************************************************************
I Introduction
II Setting parameters
III Conditions of copying/distribution
I: INTRODUCTION
---------------
Hi there !!!
I always wanted to write some program like this. The idea for this program is
probably as old as Moses' beard, and I heard, that there is an "Eye"program
around for the AMIGA as well. But self-written programs have one big
advantage : You know what you are doing !!! I tried to save memory and
process time as best as I could ( sorry, this time I didn't use assembler,
it wouldn't have sped up the program that much calling system-routines all
the time ).
The process time can be affected by two means :
- Set the parameter DELAY to a reasonable value like 5. This value determines
the time (in 1/50 seconds), how long the program will sleep after every
main loop. Set DELAY to 0 and you will get a very smooth eye-motion, but
the processor will be very busy. A DELAY=5 will do a good eye-motion as
well and needs ONLY 3% processor time on a 68000 machine while you're not
moving the mouse, because no calculation is necessary then. When moving the
mouse, the input.device will need much time.
- The task priority of the program can be set ( see chapter II ). It doesn't
affect the processing as much as the DELAY-Value.
The CHIP-memory needed by the program is affected mainly by the maximum width
and maximum height of the window. Choose it wisely. Who seriously wants to
have a window for TGs Eyes as big as 640 x 200 or so more than once or twice?
The standard values in the TG Eyes.info file (for workbench startup and
calling TG Eyes from CLI with no parameters given are reasonable. It then
needs about 16K chip and 22K fast memory.
The window is of course SIZEABLE, but I always clear the graphics for the
sizing-gadget, because it disturbs the symmetry of the eyes' graphics. But
the gadget is still there, so you can use it.
When removing or inserting a disk into a disk-drive, the eyes will start
rotating making just one loop. It looks silly, but it doesn't express the
programs attitude about the data on the inserted/removed disk. I have some
data and computer languages on my mind, which would do good enough on
rolling eyes about them forever !
Talking about computer languages: I, as an addicted C-programmer, was
writing this program using Aztec C V5.0 developer. C sure is a great
language ! It would have taken YEARS without initialized data, with strict
typecasting and importing definition modules.
About WORKBENCH 2.0 :
As far as I know, the program works correct under Workbench 2.0, but I had
to find out about the windows system dragbar height, which can be found in
the windows gadget list (GadgetType == (SYSGADGET | WDRAGGING) ), because
Workbench 2.0 supplies setting system fonts in many possible heights, making
the window dragbars heigher.
The standard WORKBENCH 2.0 colors make the TG Eyes.info icon look bad, but
on Workbench 1.3 it is fine.
I am using the blitter, copying just one bitplane except when restoring the
whole display. This means, that the program will draw no pupils when setting
the number of workbench colors to 2. Clipping only one bitplane speeds up the
clipping operation and avoids flickering on the workbench screen. It also
saves process time. You should have seen the program before I changed from
2 bitplanes to 1 bitplane clipping. The changes are astounding.
The sources can be unpacked using lharc 1.1 or higher. The syntax is
lharc -rxa x TG_Sources.lzh
LHARC will create a subdirectory 'Sources' in which the sources are placed.
(LAST MINUTE) BUG:
If you have a CLI/SHELL window behind the TG Eyes window, then sizing,
dragging or clicking to back/front of the CLI/SHELL or TG Eyes window will
mess up the CLI/SHELL window display. I think, it is because CLI/SHELL uses
simple refresh rather than smart refresh, and I have no idea how to fix this
phenomenon quickly and well.
Greetings go to
- Douglas Adams for his hitchhiker and Dirk Gently's detective agency.
- Dirk Remmelt for testing ( do not use "left amiga n" while sizing window
under workbench 1.2/1.3, it undergoes checking for window limits ), and of
course helping to debug this crazy eye-motion algorithm.
- Stefan Boldorf for testing,advice and his "legal stuff text" (thanks
a lot)! When do you send your Free-Paint program to Fred Fish ?
If you want to contact me, here is my full address:
Thomas Geib
Eierstr. 9
6750 Kaiserslautern / Germany
II: SETTING PARAMETERS
----------------------
From CLI you can set parameters:
Left window edge : X=nr
Top window edge : Y=nr
Window width : W=nr
Window height : H=nr
Maximum window width : MW=nr
Maximum window height : MH=nr
Process delay time : D=nr (refer to chapter I)
Task priority : P=nr (-128 <= nr <= 127 )
Example: "TG Eyes X=10 Y=20 W=200 H=100 MW=300 MH=120 D=5 P=-20"
You may leave out any parameter as you like. The parameters do not need to
have a certain order.
From Workbench you can set parameters by editing the TG Eyes.info file:
Select the TG Eyes - icon and call the Workbench/Info menu:
- Do adding/deleting parameters with ADD/DEL gadget.
- Edit the parameter line(s):
Left window edge : LEFTEDGE=nr
Top window edge : TOPEDGE=nr
Window width : WIDTH=nr
Window height : HEIGHT=nr
Maximum window width : MAXWIDTH=nr
Maximum window height : MAXHEIGHT=nr
Process delay time : DELAY=nr
Task priority : PRIORITY=nr
NOTE:
- for setting parameters with starting program from WORKBENCH, you need the
libs:icon.library. If this library is not found, default values will be
used.
- if your parameters (from CLI as well as from WORKBENCH) are not reasonable
( too small, too large, windows width is greater than maximum width etc. ),
the default values X=60 Y=18 W=196 H=72 MW=310 MH=110 D=5 P=-10 will be
used.
III: CONDITIONS OF COPYING/DISTRIBUTION
---------------------------------------
This package consists of the files TG Eyes, TG Eyes.info, TG Eyes.doc,
TG Eyes.doc.info and Sources/TG_Eyes.c, Sources/TG_Eyes.c.info, Sources/makefile.
The package and all its files are NOT Public Domain. However you are
allowed to copy the package as long as ALL the following demands are met.
Exception from any of the points below can only be granted by my expressed
written consent.
1. This package may only be distributed in its intact, unchanged form.
Altering, as well as omitting, expanding or any other change of the
package or any part of it is strictly forbidden!
1. Neither this package, nor any portion of it may be included in a
commercial product.
2. Neither this package, nor any portion of it may be used commercially.
3. Neither this package, nor any portion of it may appear in an electronic
mailing facility, where an additional charge to your telephone bill is
upheld.
4. The disk, this package is distributed on has to be priced below $6 in
the U.S.A. or the equivalent of DM 6 in Germany or any other country.
5. Neither this package, nor any part of it may appear or be included in
any Public Domain series without my expressed written consent.
No guarantees, implicit or explicit are provided. The user is responsible
for all damages resulting directly or indirectly from the use of this pack-
age.
Kaiserslautern, 31 July 1991